import { IN_CREMENT, DE_CREMENT } from '../action/actionTypes'
export default function reducer(state = 10, action) {
  switch (action.type) {
    case IN_CREMENT:  //用户向执行加操作
      let n = state + 1;
      console.log(n);
      return n;
    case DE_CREMENT:  //用户向执行减操作
      return state--;
    default:
      return state
  }
}